// 自动注册指令

const directiveModules = import.meta.glob('./modules/*.js')
const modulesKey = Object.keys(directiveModules)
export default (app) => {
  modulesKey.forEach((name) => {
    let directiveNameArr = name.replace('.js', '').split('/')
    let directiveName = directiveNameArr[directiveNameArr.length - 1]
    directiveName = app.directive(directiveName, directiveModules[name])
  })
}
